% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FIPS_FUNCTIONS.R
\name{name2fips}
\alias{name2fips}
\alias{fips_from_name}
\alias{names2fips}
\title{Get FIPS codes from names of states or counties
inverse of fips2name(), 1-to-1 map statename, ST, countyname to FIPS of each}
\usage{
name2fips(
  x,
  exact = FALSE,
  usegrep = FALSE,
  geocoding = FALSE,
  details = FALSE
)
}
\arguments{
\item{x}{vector of 1 or more exact names of states or ST abbreviations or
countynames that include the comma and state abbrev., like
"Harris County, TX"
(not the same as where ST is separate in \code{\link[=fips_counties_from_countyname]{fips_counties_from_countyname()}})
Ignores case.}

\item{exact}{if TRUE, query must match exactly but set to FALSE if you want partial matching
and possibly more than one result for a query term x}

\item{usegrep}{passed to \code{\link[=fips_place_from_placename]{fips_place_from_placename()}} and if TRUE, helps find partial matches}

\item{geocoding}{passed to \code{\link[=fips_place_from_placename]{fips_place_from_placename()}}}

\item{details}{set to TRUE to return a table of details on places instead of just the fips vector}
}
\value{
vector of character fips codes (unless details = TRUE)
}
\description{
Get FIPS codes from names of states or counties
inverse of fips2name(), 1-to-1 map statename, ST, countyname to FIPS of each
}
\details{
CAUTION - for cities/ towns/ CDPs/ etc. (census places), this
currently assumes a placename,ST occurs only once per state,
but there are exceptions like townships in PA that use the same name
in 2 different counties of same state.
}
\examples{
name2fips(c("de", "NY"))
name2fips("rhode island")
name2fips(c("delaware", "NY"))
name2fips(c("Magnolia town, DE", "Delaware City city, DE"))
name2fips(c('denver',  "new york" ), exact = F)

}
